package com.gdk.ksoft.data.common.constants;

import java.util.HashMap;

/**
 * Created by hel on 2014-12-01.
 * 商品类型常量
 */
public class GoodsTypeConstant {

    /**
     * 商品类型文字
     */
    public final static String GOODS_TYPE_TEXTS[] = {"正常","赠送","组合","无关赠品","抵费","补货","换货","兑奖","订货会","买赠本品","买赠它品","陈列","买本赠品","买它赠品"};

    /**
     * 商品类型值
     * 0：正常，1：促销赠品，2：组合品，3无关联赠品，4抵费，5补货，6换货，7兑奖,8订货会，9买赠本品，10买赠它品，11陈列,12买赠本品赠品，13买赠他品赠品。如果是买赠的赠品，那么买赠主品id不为0，否则就是直接赠送的赠品。
     */
    public final static int GOODS_TYPE_VALUES[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13};

    /**
     * 减缩版商品类型描述
     */
    public final static String GOODS_TYPE_SIMPLE_TEXTS[] = {"正常","赠送","补货","换货","兑奖","陈列"};

    public final static int GOODS_TYPE_SIMPLE_VALUES[]={0,1,5,6,7,11};

    /**
     * 数据源
     */
    public HashMap<Integer,String> hashMap = new HashMap<>();

    public GoodsTypeConstant(){
        for(int i=0;i<GOODS_TYPE_TEXTS.length;i++){
            hashMap.put(GOODS_TYPE_VALUES[i],GOODS_TYPE_TEXTS[i]);
        }
    }

    /**
     * 获取商品类型数据源
     * @return
     */
    public static HashMap<Integer,String> getGoodsType(){
        return new GoodsTypeConstant().hashMap;
    }

}
